<template>
  <view class="page_content">
    <view class="phone_search">
      <view class="input_box">
        <AtSearchBar
          :value="phone"
          :onChange="handleChange"
          :onActionClick="onActionClick"
        />
      </view>
      <!-- <view class="search_button"><AtButton type='primary'>搜 索</AtButton></view> -->
    </view>
    <scroll-view scrollY="true"
      class="scroll_box"
      v-if="listData.length"
      @scrolltolower="lower">
      <view class="user_item" v-for="(item,index) in listData" :key="index" @tap="gotoDetail">
        <image class="item_img" :src="item.image[0] "></image>
        <view class="item_right">
          <view>{{item.name}}所得到的</view>
          <view>{{item.mobile}} </view>
          <view>
            地址：<text class="color_orange">{{item.area}}</text>，
          </view>
        </view>
        <view class="item_left">
          编辑
        </view>
      </view>
      <AtLoadMore style="height:30px;margin-top:-10px" noMoreText="没有更多了" :status="loadingStatus"/>
      <view class="addButton">
        <AtFab onClick={this.onButtonClick.bind(this)}>
          <view className='at-fab__icon at-icon at-icon-add'></view>
        </AtFab>
      </view>
    </scroll-view>
  </view>
</template>

<script>
import Taro from '@tarojs/taro'
import { AtIcon } from 'taro-ui'
import './list.module.scss'
import ShopAPI from '../../../api/shop'
export default {
  name: 'list',
  data(){
    return{
      listData: [
        {
          address: "111",
          area: "北京市 北京市 西城区 ",
          id: 39,
          image: ["https://zltc-1255680458.cos.ap-beijing.myqcloud.com/1599012827.jpg"],
          image_id: "1861",
          lat: null,
          lng: null,
          mobile: "15726370706",
          name: "智联加油站",
          point: "3865.00",
          real_name: "门店",
          user_level_id: 24,
          username: "15610740121",
        }
      ],
      phone: "",
      total: 0,
      page: 1,
      loadingStatus: "more",
      showLoading: false, // 上滑加载更多
    }
  },
  methods: {
    gotoDetail(){
      Taro.navigateTo({
        url: "/pages/shop/store/add"
      })
    }
  },
  mounted(){
    // this.init();
  },
  // S
}
</script>